<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 00:33:05
 * @LastEditTime: 2023-09-18 17:18:22
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 工序
 */

namespace App\Models;

use App\Traits\SoftDeletesTrait;

class ProDyecraft extends BaseModel
{
    use SoftDeletesTrait;
    public $timestamps = true;
    public $table = "basedata_pro_dyecraft";
    protected $guarded = [];
    protected $casts = [
        // 'allow_outside' => 'boolean',
    ];
    public function category()
    {
        return $this->belongsTo(Dic::class, "category_id", "key")->where(function ($q) {
            $q->where("code", 'dyecraftCategory');
        });
    }
}
